package com.briup.task;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalTime;

/**
 * 测试任务类
 */
//@Component //组件
@Configuration
public class MyTask {
    //每10s执行一次
    // https://cron.ciding.cc/
    @Scheduled(cron = "*/5 * * * * *")
    public void method(){
        System.out.println(LocalTime.now() +"执行方法");
    }
}
